package com.softdev.utils;

import com.softdev.pojo.User;
import org.springframework.security.core.context.SecurityContextHolder;

public class UserIdFindingUtil {

    public static Long getUserId() {

        User user = (User) SecurityContextHolder.getContext().getAuthentication().getPrincipal();

        return user.getId();

    }

}
